package com.mm.dao;

import com.mm.model.Company;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface CompanyMapper {
	/**
	 * 保存店铺
	 *
	 * @param company Company
	 */
	void insertCompany(Company company);

	/**
	 * 更新店铺
	 *
	 * @param company Company
	 */
	void updateCompanyById(Company company);

	/**
	 * 获取店铺
	 *
	 * @param companyId 店铺ID
	 * @return Company
	 */
	Company getOneCompanyById(Long companyId);

	/**
	 * 通过店铺ID删除店铺
	 *
	 * @param companyId 店铺ID
	 */
	void deleteCompanyById(Long companyId);

	/**
	 * 保存店铺图片关系
	 *
	 * @param companyId      店铺ID
	 * @param pictureIdArray 图片ID数组
	 */
	void insertCompanyPicture(@Param("companyId") Long companyId, @Param("pictureIdArray") String[] pictureIdArray);
}